//
//  BrandTitleCell.m
//  jipin
//
//  Created by chuangjia on 17/5/15.
//  Copyright (c) 2015 liuchengbin. All rights reserved.
//

#import "BrandTitleCell.h"

@interface BrandTitleCell ()
{
    
}
@property(nonatomic,strong)UILabel *titleLabel;
@property(nonatomic,strong)UIButton *rightLabel;

@end
@implementation BrandTitleCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor=[UIColor clearColor];
        _titleLabel =[[UILabel alloc] initWithFrame:CGRectZero];
        _titleLabel.backgroundColor = [UIColor clearColor];
        _titleLabel.textColor = NICKNAME_COLOR;
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.font = FONT(16);
        _titleLabel.text =@"极品小K:";
        _titleLabel.numberOfLines=0;
        [self.contentView addSubview:_titleLabel];

        _rightLabel = [UIButton buttonWithType:UIButtonTypeCustom];
        [_rightLabel setTitle:@"+关注" forState:UIControlStateNormal];
        [_rightLabel setTitleColor:[UIColor colorWithRed:0.180 green:0.698 blue:0.427 alpha:1] forState:UIControlStateNormal];
        //[btnBrand addTarget:self action:@selector(brandAction:) forControlEvents:UIControlEventTouchUpInside];
        _rightLabel.titleLabel.font = FONT(16);
        [self.contentView addSubview:_rightLabel];
        
    }
    return self;
}
-(void)dealloc
{
    self.data=nil;
    self.titleLabel=nil;
    self.rightLabel=nil;
//    DLog(@"%s", __PRETTY_FUNCTION__);
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
}
/// 根据数据模型来显示内容
- (void)showInfo:(id)model indexPath:(NSIndexPath *)indexPath
{
    self.indexPath=indexPath;
    _titleLabel.frame =CGRectMake(PHOTO_TIME_PADDING,25, 100, 20);
    _rightLabel.frame =CGRectMake(DEVICE_WIDTH-70, 25, 60, 20);
    [self layoutSubviews];
}
/// 返回Cell高度
+ (CGFloat)returnCellHeight:(id)model
{
    return 45;
}

@end
